package com.yenlien.traceyun.plant.entity;

import com.yenlien.traceyun.webase.entity.BaseEntity;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;

/**
 * @Date 2023/10/25
 * @Author jiaLong
 * @Descript 欧柯奇 设备数据
 */
@Data
@Entity
@Table(name = "t_okq")
public class OKQData extends BaseEntity implements Serializable {
    private static final long serialVersionUID = -5152963930027455032L;

    private String equipmentId;         // 自己平台的设备ID
    private String baseSoilId;          // 地块ID
    private String companyId;





    private String exhibitionPath;   // 分析图片

    private String pictureUrl;      // 未分析的图片

    private String pictureAnalysis;      // 分析结果 info里面的数组长度就是该虫对应的数量 {"width":2000,"height":1500,"info":{"小菜蛾":[[716.0,961.0,81.0,74.0],[797.0,723.0,46.0,96.0]]}}


    private String equipmentName;       // 自己平台的设备名

    private String type;                  // 1=气象传感  2=土壤墒情  3=虫情测报  4=水质  5=杀虫灯  6=摄像机

    private String cTime;                  // 采集时间


    private String temperature;                  // 温度

    private String humidity;                  // 湿度

    private String bugNum;                  // 杀虫数目




    @Transient
    private String key;                   // 虫情监控图片   兼容世纪瑞通

    @Transient
    private String status;  // 在线状态：0-不在线，1-在线   2(报警,山东仁科)  3(预警,山东仁科)
    @Transient
    private String collectionTime;


//    public OKQData() {
//        val = cTime;
//        key = StringUtils.isBlank(exhibitionPath) ? pictureUrl : exhibitionPath;
//    }
//    // Page<OKQData> getHistoryData
//    public void setcTime(String cTime) {
//        this.cTime = cTime;
//        this.val = cTime;
//    }
//
//    public void setExhibitionPath(String exhibitionPath) {
//        this.exhibitionPath = exhibitionPath;
//        this.key = StringUtils.isBlank(exhibitionPath) ? pictureUrl : exhibitionPath;
//    }
//
//    public void setPictureUrl(String pictureUrl) {
//        this.pictureUrl = pictureUrl;
//        this.key = StringUtils.isBlank(exhibitionPath) ? pictureUrl : exhibitionPath;
//    }


}
